<% content_for :title do %>All Users<% end %>
<h1>All Users</h1>


<table class="table">
	<thead>
		<tr>
			<th>Name</th>
			<th>Email</th>
		</tr>
	</thead>

	<tbody>
		<% @users.each do |user| %>
			<tr>
				<td><%= user.name %></td>
				<td><%= user.email %></td>
				<td><%= link_to 'Show', user_path(user) %></td>
				<td><%= link_to 'Delete', user_path(user), method: :delete, data: { confirm: 'Are you sure?' } %></td>
			</tr>
		<% end %>
	</tbody>

</table>

<%= link_to "Sign Out", sessions_destroy_path %>